package com.boang.controller.house;

import com.boang.entity.Community;
import com.boang.resp.Result;
import com.boang.service.CommunityService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
@author:22567
@date:2025/3/3 15:44
*/
@Tag(name = "城市管理CommunityController")
@RestController
@RequestMapping("/community")
public class CommunityController {
    @Autowired
    private CommunityService communityService;


    //-------------------添加--------------------
    @PostMapping("/add")
    @Operation(summary = "添加城市")
    public Result<Boolean> add(@RequestBody Community community) {
        return Result.ok(communityService.save(community));
    }

}
